package com.irssproject.app.dao.recomanacions.iface;

import com.irssproject.app.entitats.*;
import com.irssproject.app.entitats.recommendations.UserClustersRecommendation;
import java.util.List;

public interface RecommendationsDAO {

    public void insertReadingProfile(ReadingProfile perfil);

    public ReadingProfile getReadingProfile(Long idusuari, Long idfeed, Long iditem, Long idconcepte);

    public Long insertTopic(String tipus, String valor);

    public void esborrarClusters();

    public List<User> getNeighbors(User usuari) throws Exception;

    public List<User> fillNeighbors(User usuari, String[] usrs) throws Exception;

    public List<Topic> getUserTopicsByLabelId(Long idusuari, Long idetiqueta);

    public List<Topic> getUserTopicsByFeedId(Long idusuari, Long idfeed);

    public List<UserClustersRecommendation> getTopClusters(User user);

    public List<Label> getMostPopularLabels();

    public List<Feed> getTopFeeds(User user);

    public List<Item> getTopItemsByCluster(User user, Long idConcepte);

    public List<Feed> getMostPopularFeedsByLabel(String idEtiqueta);

    public List<Item> getTopItemsByFeed(User user, Long idFeed);

    public List<Item> fillTopItemsByFeed(User user, Long idFeed, String[] items);

    public Topic getConcepteByTipusValor(String tipusConcepte, String valorConcepte);

    public void incrementarFrequenciaConcepte(ReadingProfile perfil);

    public List<Topic> getConceptesUsuari(User usuari) throws Exception;

    public List<UserClustersRecommendation> getMatchingClusters(User connectedUser, User recommendedUser);

    public List<UserClustersRecommendation> fillMatchingClusters(User connectedUser, User recommendedUser, String[] recommendedTopics);

    public Topic getConcepteById(Long idConcepte);

    public List<Feed> getFeedsHavingConcepte(Topic concepte);

    public List<Item> getPersItemsByCluster(Long conceptId, Long userId);

    public List<Item> fillPersItemsByCluster(Long conceptId, Long userId, String[] items);

    public List<Item> fillTopItemsByCluster(User user, Long conceptId, String[] items);

    public void createUserSubsription(User user, User userToSubs) throws Exception;

    public void createTopicSubsription(User user, Long topicIdToSubs) throws Exception;

    public List<Item> getTopItems(User user);

    public List<Item> fillTopItems(User user, String[] items);

    public List<ReadingProfile> getAllReadingProfiles(int from, int nmrRcrds);

    public void deleteCluster(ReadingProfile pfl);

    public Long getClustersNumber();
    
    public List<UserClustersRecommendation> getClusters(User connectedUser, List<User> usrsLst) throws Exception;

    public List<UserClustersRecommendation> fillClusters(User connectedUser, List<User> usrsLst, String[] items) throws Exception;

    public Long getTopicByName(String topic);

    public List<Topic> getTopicLstLikeName(String topic);
    
    
}
